package edu.hrbeu.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author wzq
 * @create 2022-01-06-11:13
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "t_book", resultMap = "rmBook")
public class Book {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private String name;
    private String author;

    @TableField(value = "category_id", property = "category.id")
    private Category category;
    private Integer repository;
    private Float price;

    @TableField(exist = false)
    private Float promotionPrice;
    @TableField(exist = false)
    private Float vipPrice;
}
